import asyncio
import random
import threading

async def Hello(index):
    print('Hello world! index=%s, thread=%s' % (index, threading.currentThread()))
    await asyncio.sleep(random.randint(1, 5))
    print('Hello again! index=%s, thread=%s' % (index, threading.currentThread()))


loop = asyncio.get_event_loop()
tasks = [Hello(1), Hello(2)]
loop.run_until_complete(asyncio.wait(tasks))
loop.close()